﻿@model IEnumerable<MvcAtletIS.Models.Clubs>
@{
    ViewBag.Title = "Klubové tabuľky";
}
@section head {
    
    <style type="text/css">
        table { border: solid 1px #e8eef4; border-collapse: collapse; font-size: 12px; }
        tr:nth-child(odd) { background:#eee; }
        tr:nth-child(even) { background:#fff; }
    </style>
}

<h2>Klubové tabuľky</h2>

<!-- --------- FILTER ---------- -->
@using (Html.BeginForm())
{ 
    <div class="filter-frame">
        
        <div class="filter-item">
            <div class="editor-label">
                Vyberte rok
            </div>
            <div class="editor-field">
                @Html.DropDownList("Year", null, null, new { onchange = "this.form.submit();" })
            </div>
        </div>

    </div>
}

<table width="60%">
@foreach (var item in Model) 
{
    if (item.Checked)
    {
    <tr>
        <td width="90%">
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td width="10%" align="center">
            <a href="@Url.Content("~/Content/stats/clubs/" + @ViewBag.selectedYear + "/" + @item.ID + ".pdf")" target="_blank">
                <img src="@Url.Content("~/Content/icons/preview.gif")" alt="Preview" />
            </a>         
        </td>
    </tr>
    }
}
</table>